//
//  BLBaseLineCell.m
//  BasketBallLeagues
//
//  Created by kenshin on 4/29/17.
//  Copyright © 2017 kenshin. All rights reserved.
//

#import "BLBaseLineCell.h"

@interface BLBaseLineCell ()

@property (nonatomic, strong) UIView *lineView;

@end

@implementation BLBaseLineCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    [self addLineView];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self addLineView];
    }
    return self;
}

- (void)addLineView
{
    _lineView = [[UIView alloc] init];
    _lineView.backgroundColor = [BLColorConfig lineColor];
    [self addSubview:_lineView];
    CGFloat height = 1.f/[UIScreen mainScreen].scale;
    [_lineView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.height.mas_equalTo(height);
        make.leading.mas_equalTo(0);
        make.trailing.mas_equalTo(0);
        make.bottom.mas_equalTo(-height);
    }];
}

@end
